#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);

    int even_count = 0, odd_count = 0;
    for (int i = 0; i < N; i++) {
        int num;
        scanf("%d", &num);
        if (num % 2 == 0) {
            even_count++;
        }
        else {
            odd_count++;
        }
    }

    printf("%d %d\n", odd_count, even_count);
    return 0;
}